running a function after x seconds in python